export default {
	data() {
		return {
			num: 1,
			loading: false,
		};
	},
	mounted() {
		console.log("我是混合的mounted");
		this.showLoading();
		const time = setInterval(() => {
			if (this.loading) {
				console.log("loading");
			} else {
				console.log("done");
			}
		}, 500);
		setTimeout(() => {
			this.hideLoading();
			clearInterval(time);
		}, 3000);
	},
	methods: {
		showLoading() {
			this.loading = true;
			console.log("loading函数");
		},
		hideLoading() {
			this.loading = false;
			console.log("done函数");
		},
	},
};
